package com.bf.electroplating.pojo.enums;

import lombok.Getter;

@Getter
public enum IndustryTypeEnum {

    DZ("0", "电子电镀"),
    HJ("1", "合金电镀"),
    SX("2", "碱性电镀"),
    GY("3", "公用事业"),
    ;

    private final String code;
    private final String desc;

    private IndustryTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(String code) {
        for (IndustryTypeEnum item : IndustryTypeEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getDesc();
            }
        }
        return null;
    }

}
